# -*- coding: utf-8 -*-
"""
TG水平布局组件 - TgHBoxLayout
水平布局组件，将子组件水平排列
"""
from PySide6.QtWidgets import QHBoxLayout
from ..base.layout import TgLayoutMixin


class TgHBoxLayout(TgLayoutMixin, QHBoxLayout):
    """TG水平布局"""
    
    def __init__(self, parent=None, margins='medium', spacing='medium'):
        # 显式调用父类的__init__方法
        if parent:
            QHBoxLayout.__init__(self, parent)
        else:
            QHBoxLayout.__init__(self)
        TgLayoutMixin.__init__(self, margins=margins, spacing=spacing)